#include "VzlprWrap.h"

#define SET_FUNCTION(name) \
  Nan::Set(target, Nan::New(#name).ToLocalChecked(), \
    Nan::New<v8::FunctionTemplate>(name)->GetFunction())

NAN_MODULE_INIT(InitAll) {
  Nan::HandleScope scope;

  DeviceWrap::Init(target);

  SET_FUNCTION(on);

  SET_FUNCTION(setup);
  SET_FUNCTION(cleanup);

  SET_FUNCTION(startFindDevice);
  SET_FUNCTION(stopFindDevice);

  SET_FUNCTION(open);
  SET_FUNCTION(close);

  SET_FUNCTION(getUpdateFileVersion);
}

NODE_MODULE(NODE_GYP_MODULE_NAME, InitAll)